#include "mystdio.h"
#include <string.h>
#define filename "test.txt"
#include <unistd.h>

int main()
{
    _FILE*fp=_fopen(filename,"a");
    if(fp==NULL)return 1;
    const char* msg="hello linux\n";
    int cnt=10;
    while(cnt--)
    {
        _fwrite(fp,msg,strlen(msg));
        //_fflush(fp);
        sleep(1);
    }
    
    //_fwrite(fp,msg,strlen(msg));
    _fclose(fp);

    return 0;
}
